<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>PlanarGC: PlanarVertex Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PlanarGC
   &#160;<span id="projectnumber">1.0.2</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('a00027.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">PlanarVertex Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="a00041_source.html">Planar.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aeff0261a041fd159e3c1c16094d61ca0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#aeff0261a041fd159e3c1c16094d61ca0">PlanarVertex</a> ()</td></tr>
<tr class="memitem:adc8b56d8ff53b0875d177a252367b6ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#adc8b56d8ff53b0875d177a252367b6ae">~PlanarVertex</a> ()</td></tr>
<tr class="memitem:a33477752176de2324e782acad7d65d2b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#a33477752176de2324e782acad7d65d2b">getNumEdges</a> ()</td></tr>
<tr class="memitem:a59deac4a342fff7e0dda28aa83937909"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00025.html">PlanarEdge</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#a59deac4a342fff7e0dda28aa83937909">getEdge</a> (int id)</td></tr>
<tr class="memitem:a96f79bc032b6354c1c436eee2e72256b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#a96f79bc032b6354c1c436eee2e72256b">setEdgesCCW</a> (<a class="el" href="a00025.html">PlanarEdge</a> **ccw, int nEdges)</td></tr>
<tr class="memitem:aa32cd7f948bf71d7d8fba1f2d374d087"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#aa32cd7f948bf71d7d8fba1f2d374d087">getEdgeID</a> (<a class="el" href="a00025.html">PlanarEdge</a> *e)</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a633fc000a7f785eefc4172715e3ff7c1"><td class="memItemLeft" align="right" valign="top">class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00027.html#a633fc000a7f785eefc4172715e3ff7c1">PlanarEdge</a></td></tr>
</table>
<a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p><a class="el" href="a00027.html">PlanarVertex</a> is the central data structure in order to describe the algebraic embedding of planar graph's vertices.</p>
<p>To every <a class="el" href="a00027.html">PlanarVertex</a>, there exists a set of <a class="el" href="a00025.html">planar edges</a> that leaves resp. enters this vertex. Since the vertex is embedded in a planar graph, the edges form a star-like structure. By defining one "first edge", all edges can be ordered in a counter-clock-wise sense. This order is also known as an algebraic embedding.</p>
<p>This class handles this structure as comfortable as possible. In order to efficiently obtain this <a class="el" href="a00027.html#aa32cd7f948bf71d7d8fba1f2d374d087">edge ID</a>, an additional data element in <a class="el" href="a00025.html">PlanarEdge</a> is directly used by methods of <a class="el" href="a00027.html">PlanarVertex</a>. This is the reason for the "friend" relationship between <a class="el" href="a00025.html">PlanarEdge</a> and <a class="el" href="a00027.html">PlanarVertex</a>. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00001.html#_a0">cutplanar.cpp</a>.</dd>
</dl></div><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aeff0261a041fd159e3c1c16094d61ca0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PlanarVertex::PlanarVertex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the constructor builds a <a class="el" href="a00027.html">PlanarVertex</a> with no outgoing or incoming edges. </p>

</div>
</div>
<a class="anchor" id="adc8b56d8ff53b0875d177a252367b6ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PlanarVertex::~PlanarVertex </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the destructor deletes only the references on stored <a class="el" href="a00025.html">planar edges</a>. </p>

</div>
</div>
<h2>Member Function Documentation</h2>
<a class="anchor" id="a33477752176de2324e782acad7d65d2b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PlanarVertex::getNumEdges </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>provides the number of stored edges. </p>

<p>Referenced by <a class="el" href="a00014.html#af2f6768ff02dbf059f9fcdc019684e1a">CutPlanar::performChecks()</a>.</p>

</div>
</div>
<a class="anchor" id="a59deac4a342fff7e0dda28aa83937909"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00025.html">PlanarEdge</a>* PlanarVertex::getEdge </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>returns the edge with the ID <code>id</code>. This method provides also the correct result if <code>id&lt;0</code> or <code>id&gt;<a class="el" href="a00027.html#a33477752176de2324e782acad7d65d2b">getNumEdges()</a>-1</code>.</p>
<p><b>Example:</b> If four edges are stored, the following three getEdge-lines will all return the first stored edge: </p>
<div class="fragment"><div class="line">num  = <a class="code" href="a00027.html#a33477752176de2324e782acad7d65d2b">getNumEdges</a>(); <span class="comment">// num = 4</span></div>
<div class="line">edge = <a class="code" href="a00027.html#a59deac4a342fff7e0dda28aa83937909">getEdge</a>( 0);</div>
<div class="line">edge = <a class="code" href="a00027.html#a59deac4a342fff7e0dda28aa83937909">getEdge</a>( 4);</div>
<div class="line">edge = <a class="code" href="a00027.html#a59deac4a342fff7e0dda28aa83937909">getEdge</a>(-4);</div>
</div><!-- fragment --> 
<p>Referenced by <a class="el" href="a00014.html#af2f6768ff02dbf059f9fcdc019684e1a">CutPlanar::performChecks()</a>, and <a class="el" href="a00014.html#a01a9e90b3328391eae17620dea2fabb3">CutPlanar::preFlow()</a>.</p>

</div>
</div>
<a class="anchor" id="a96f79bc032b6354c1c436eee2e72256b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void PlanarVertex::setEdgesCCW </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00025.html">PlanarEdge</a> **&#160;</td>
          <td class="paramname"><em>ccw</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nEdges</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>the edges of the vertex are defined by the <code>nEdges</code> references that are stored in <code>ccw</code>. The edges in <code>ccw</code> have to be provided in a counter-clockwise order. Additionally, in the <a class="el" href="a00025.html">PlanarEdge</a> <code>*ccw</code>[i] the ID <code>i</code> is stored as its tail resp. head edge ID. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="a00001.html#a4">cutplanar.cpp</a>.</dd>
</dl>
<p>References <a class="el" href="a00025.html#a985bd04c284fd2527cfd8841b3cae49a">PlanarEdge::getHead()</a>, and <a class="el" href="a00025.html#a3590b0fe6674ff0828705ad52f40908d">PlanarEdge::getTail()</a>.</p>

<p>Referenced by <a class="el" href="a00013.html#aaf9451998cd6a4164f290cb9141c325e">CutGrid::CutGrid()</a>, and <a class="el" href="a00016.html#a39a6a0ce3f60a9be1318d267d37a355b">CutShape::setDissimilarityMatrix()</a>.</p>

</div>
</div>
<a class="anchor" id="aa32cd7f948bf71d7d8fba1f2d374d087"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int PlanarVertex::getEdgeID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00025.html">PlanarEdge</a> *&#160;</td>
          <td class="paramname"><em>e</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>provides the edge ID that the edge reference <code>e</code> has in the counter-clockwise array of the current <a class="el" href="a00027.html">PlanarVertex</a>. If the edge is not adjacent to the <a class="el" href="a00027.html">PlanarVertex</a>, the method returns <code>-1</code>. </p>

<p>References <a class="el" href="a00025.html#a985bd04c284fd2527cfd8841b3cae49a">PlanarEdge::getHead()</a>, and <a class="el" href="a00025.html#a3590b0fe6674ff0828705ad52f40908d">PlanarEdge::getTail()</a>.</p>

</div>
</div>
<h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a633fc000a7f785eefc4172715e3ff7c1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="a00025.html">PlanarEdge</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<hr class="footer"/><address style="text-align: right;"><small>
  &copy; 2009 - 2013 by Eno T&ouml;ppe, Frank R. Schmidt
  <br/>
  generated by <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a>
</small></address>
